package state.bean;

public class GameRect {
  public int _x = 0;
  public int _y = 0;
  public int _width = 0;
  public int _height = 0;

  private particle.core.tools.Rect rect = new particle.core.tools.Rect();

  public GameRect(int x, int y, int width, int height) {
    this._x = x;
    this._y = y;
    this._width = width;
    this._height = height;
  }

  public boolean contains(int x1, int y1) {
    return (x1 > this._x && y1 > this._y && x1 < this._x + this._width && y1 < this._y + this._height);
  }

  public particle.core.tools.Rect getParticleRect() {
    rect.left = _x;
    rect.right = _x + _width;
    rect.top = _y;
    rect.bottom = _y + _height;
    return rect;
  }
}
